package action.manage;

import java.sql.Timestamp;

import model.app.AppRate;
import service.applycheck.AppRateService;
import util.Time;
import core.action.BaseAction;
import exception.Exceptions;

public class RateManage extends BaseAction{
	private AppRateService appRateService;
	
	private AppRate appRate;
	
	public String execute(){
		this.appRate = this.appRateService.getAppRate();
		return "success";
	}
	
	public String save() throws Exceptions{
		Timestamp nowTime = Time.CurrentTimestamp();
		appRate.setSetdate(nowTime);
		this.appRateService.save(appRate);
		MessageJump("基准利率设定完成！", "rateManage");
		return "message";
	}

	public AppRateService getAppRateService() {
		return appRateService;
	}

	public void setAppRateService(AppRateService appRateService) {
		this.appRateService = appRateService;
	}

	public AppRate getAppRate() {
		return appRate;
	}

	public void setAppRate(AppRate appRate) {
		this.appRate = appRate;
	}
	
	

}
